const path = require('path');
const arr = require('./module.js');

const watchFiles = [];
arr.forEach((item) => {
    watchFiles.push(`./src/manage/${item}.html`);
})

module.exports = {
    port: 8080,
    hot: 'only',
    open: true,
    watchFiles,
    static: {
        directory: path.join(__dirname, 'dist'),
    },
    proxy: {
        '/api': {
            target: 'http://127.0.0.1:3000/',
            pathRewrite: { "^/api": "" },
            changeOrigin: true
        }
    }
}